package com.woniu.platform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.platform.entity.PlatformUser;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface PlatformUserMapper extends BaseMapper<PlatformUser> {
    /**
     * 用户登录
     * @param acount
     * @return
     */
    PlatformUser getUserByUserName(String acount);

    /**
     * 通过用户昵称，账号，手机号，状态查询用户
     * @param userName
     * @param account
     * @param phone
     * @param state
     * @return
     */
    List<PlatformUser> queryPlatformUserInfo(String userName,String account,String phone,Integer state,Integer id);

    /**
     * 修改用户的身份
     * @param uid
     * @param rid
     */
    void changePlatformUandR(Integer uid,Integer rid);

    /**
     * 添加角色
     * @param uid
     * @param rid
     */
    void insertPlatformUandR(Integer uid,Integer rid);
}
